package org.ricks.ioc;

import org.ricks.ioc.anno.*;

@Bean
public class UserAction {

    @Value("jdbc.url")
    private String jdbcUrl;

    @Autowired
    private UserServer userServer;

    public int add (int a , int b) {
        return a + b;
    }

    public String loadJdbcUrl () {
        return jdbcUrl;
    }

    public String test () {
        return  "i am user action ---- " + userServer.test();
    }


    @Init(priority = 111)
    private void  init () {
        System.err.println("初始化。。。。。。");
    }

    @PreDestroy(priority = 1)
    private void destroy () {
        System.err.println("开始销毁。。。。。。");
    }
}
